<template>
  <el-dialog show-close :model-value="showDialog" :title="title" :close-on-click-modal="false"
             :before-close="beforeClose" width="60%">
    <slot></slot>
  </el-dialog>
</template>

<script setup>
import {defineProps, defineEmits} from "vue";

const props = defineProps({
  showDialog: false,
  title: {
    type: String,
    default: "对话框"
  }
})
const emit = defineEmits(['update:showDialog'])

function beforeClose() {
  emit("update:showDialog", false)
}
</script>

<style lang="less" scoped>

</style>
